package com.itheima.mapper;

import com.itheima.domain.OrderSetting;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @PackageName: com.itheima.mapper
 * @ClassName: OrderSettingMapper
 * @Author: Solomon
 * @Date: 2020/7/7 16:08
 * @Description:
 */
public interface OrderSettingMapper {

    //根据日期查找是否已经设置了预约套餐
    int findCountByOrderDate(Date orderDate);

    //新增预约设置
    void add(OrderSetting orderSetting);

    //修改预约设置
    void updateNumberByOrderDate(OrderSetting orderSetting);

    //根据月份查询当前月的预约设置信息
    List<OrderSetting> findOrderSettingByMonth(Map<String, String> map);

    //根据页面输入的预约日期查询当前日期是否进行了预约设置
    OrderSetting findOrderSettingByOrderDate(Date orderDate);

    //根据日期修改预约人数，并返回影响行数
    void updateReservations(Date orderDate);
}
